<?php

/**
 * Main Graphical user interface elements
 * 
 * @author Mykolas Jarašiūnas
 */

    $page_title = htmlspecialchars($page_title);
    //FIXME: normal GUI path evaluation
    if (strpos($_SERVER['REQUEST_URI'], '/GUI/') !== false) {
        $prefix = '';
    } else {
        $prefix = 'GUI/';
    }
    echo '<?xml version="1.0" encoding="utf-8"?>' . "\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="lt" lang="lt">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
        <link rel="stylesheet" href="<?=$prefix;?>main2.css" type="text/css"/>
        <script src="<?=$prefix;?>table.js" type="text/javascript"></script>
        <title><?=$page_title;?></title>
    </head>
    <body>
        <div class="box_left">
            <div class="box_right">
                <div class="logo"></div>
                <div class="sidebar">
                    <?php
                        if($tabs != ""){
                            print tabs_list_start();
                            print $tabs;
                            print tabs_list_end();
                        }
                        print $sidebar_content;
                        if($help != ""){
                            print form_help_widget($help);
                        }
                    ?>
                </div>
                <div class="main_content">
                    <?php
                        print messages("error");
                        print messages("warning");
                        print messages("success");
                        print $main_content;
                    ?>
                   
                </div>
                <div class="floater"></div>
            </div>
        </div>
        <div class="footer">Paramos administravimo asistentas <i>0.1 beta versija</i> | Sprendimas: <a href="mailto:gramasoft@googlegroups.com">GRAMAsoft</a> 2011.<br/><small><?=$footer;?></small></div>
    </body>
</html>        